const mongoose = require('mongoose')

// 文章文档对象
const articleSchema = new mongoose.Schema({
  id: Number,
  author: String,
  title: String,
  createTime: String,
  content: String,
  stemfrom: String,
  read: {
    type: Number,
    default: 0
  },
  star: {
    type: Number,
    default: 0
  },
  comment: {
    type: Number,
    default: 0
  }
})

const Article = mongoose.model('jianshu_article', articleSchema)

module.exports = {
  Article
}